package com.runshu.newsmartark.network.netbean;


import java.util.HashMap;
import java.util.Map;

/**
 * <pre>
 *     desc   : 请求参数封装类
 *     version: 1.0   初始化
 *     params:
 *  <pre>
 */

public class HttpRequestParamsBuilder {
    private Map<String, Object> mMap;

    public HttpRequestParamsBuilder() {
        if (mMap == null) {
            mMap = new HashMap<>();

        } else {
            mMap.clear();
        }
    }

//    public HttpRequestParamsBuilder putParams(String key, String value) {
//        mMap.put(key, value);
//        return this;
//    }

    public HttpRequestParamsBuilder putParams(String key, Object value) {
        mMap.put(key, value);
        return this;
    }
    public HttpRequestParamsBuilder putUrl(String value) {
        mMap.put("url", value);
        return this;
    }

    public Map build() {
        // TODO: 2017/8/10 更换成动态获得ID 和jqkey
//        int uid = UserPropertyUtils.getUid(BaseApplication.getInstance());
//        mMap.put("userid", "");
//        mMap.put("jiguangid", UserPropertyUtils.getJPushId());
        return mMap;
    }
}
